<?php
// .-----------------------------------------------------------------------------------
// | WE TRY THE BEST WAY 杭州博也网络科技有限公司
// |-----------------------------------------------------------------------------------
// | Author: 贝贝 <hebiduhebi@163.com>
// | Copyright (c) 2013-2016, http://www.itboye.com. All Rights Reserved.
// |-----------------------------------------------------------------------------------
namespace Shop\Api;
use Common\Api\Api;
use Shop\Model\GrouporderidModel;

class GrouporderidApi extends Api{


    /**
     * 查询,不分页
     */
    const QUERY_NO_PAGING = "Shop/Grouporderid/queryNoPaging";
    /**
     * 添加
     */
    const ADD = "Shop/Grouporderid/add";
    /**
     * 保存
     */
    const SAVE = "Shop/Grouporderid/save";
    /**
     * 保存根据ID主键
     */
    const SAVE_BY_ID = "Shop/Grouporderid/saveByID";

    /**
     * 删除
     */
    const DELETE = "Shop/Grouporderid/delete";

    /**
     * 查询
     */
    const QUERY = "Shop/Grouporderid/query";
    /**
     * 查询一条数据
     */
    const GET_INFO = "Shop/Grouporderid/getInfo";
    /**
     * 查询条数
     */
    const GET_COUNT = "Shop/Grouporderid/getcount";
    /**
     * 查询类目属性的值表
     */
    const QUERY_PROP_TABLE = "Shop/Grouporderid/queryPropTable";



    protected function _init(){
        $this->model = new GrouporderidModel();
    }


    public function getcount($map){


        $result = $this -> model -> where($map) -> count('id');
        if ($result === false) {
            $error = $this -> model -> getDbError();
            return $this -> apiReturnErr($error);
        } else {
            return $this -> apiReturnSuc($result);
        }

    }





}


